<%@page import="Donnees.RepresentationBean"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="Donnees.SpectacleBean"%>
<%

	String humoriste = (String)request.getAttribute("humoriste");
	SpectacleBean[] listeSpectacleBean = (SpectacleBean[])request.getAttribute("listeRepresentations");
%>
<!doctype html>
<html>
	<head>
		<title>Billetterie 525 - Spectacles</title>		
	</head>
			
	<!-- head -->
	<jsp:include page="head.html" />
	<body>	
	    <!--container-->
	    <div id="container">
		
		    <!-- header -->
			<jsp:include page="header.html" />
		   
			<!--body-->
			<div class="holder_content">					    
				<h3>LISTE DES SPECTACLES</h3>     
			    <div class="liste">
				    <table >
							       
			            <% if(listeSpectacleBean != null)
			            	{%>
			            	<tr>
								<td><%=humoriste%></td>
				        	</tr><%
			            		for(int i=0; i<listeSpectacleBean.length;i++){%>	                	
				            <tr onclick="location.href = 'BilletterieServlet?idSpectacle=<%=listeSpectacleBean[i].getId()%>';">
					        	<td><%=listeSpectacleBean[i].getTitre()%></td>
				        	</tr>
			            <%}
			            }else
			            {%>
			            	<tr>
								<td>Aucun humoriste trouvé.</td>
				        	</tr>
			            	
			            <%}%>            
					</table>
			    </div>	
			    	    
			</div>
		
		<!--end container-->
	    </div>
	   
	   	<!-- footer -->
		<jsp:include page="footer.html" />		
	     
	</body>
</html>